﻿<%@ Page Title="" Language="C#" MasterPageFile="~/OrderManagement.master" AutoEventWireup="true"
    CodeBehind="OrderInstruction.aspx.cs" Inherits="SCFHS.Views.OrderInstruction" %>

<asp:Content ID="Content1" ContentPlaceHolderID="NastedHead" runat="server">
    <script type="text/javascript">
        $("docment").ready(function () {

            $("#OrderInstruction").addClass("createOrderMenuactive");

            $('.collapse .BoxContent').hide();

            $(".expander").click(function () {
                $('.collapse .BoxContent').hide();
                $(this).parents(".collapse").find(".BoxContent").toggle();
                return false;
            });
        });
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="NastedBody" runat="server">
    <asp:HiddenField ID="hdfOrderNo" runat="server" />
    <asp:Label Text=" " runat="server" ID="lblMessage" />
    <asp:MultiView ActiveViewIndex="0" runat="server" ID="mView">
        <asp:View runat="server" ID="vGetOrder">
            <div class="tooltip">
                <asp:Label ID="Label2" Text="أدخل رقم الطلب للإستمرار" runat="server"></asp:Label>
            </div>
            <div id="SelectOrder">
                <div class="row OrderInfo">
                    <ul class="title">
                        <li>رقم الطلب</li>
                    </ul>
                    <ul class="data">
                        <li>
                            <asp:TextBox runat="server" ID="txtOrderNumberToSearch" Font-Size="18" TabIndex="1"
                                ValidationGroup="Search" CssClass="ltrNumbers" /><asp:RequiredFieldValidator ID="RequiredFieldValidator1"
                                    ErrorMessage="يجب إدخال رقم الطلب أولا" ControlToValidate="txtOrderNumberToSearch"
                                    ValidationGroup="Search" runat="server" Text="*" ForeColor="Red" /></li>
                    </ul>
                    <ul class="data">
                        <li>
                            <asp:Button Text="توجية الطلب" runat="server" ID="btnNextToOrder" CssClass="button"
                                Font-Size="16" ValidationGroup="Search" OnClick="btnNextToOrder_Click" TabIndex="2" />
                        </li>
                    </ul>
                </div>
            </div>
        </asp:View>
        <asp:View runat="server" ID="vEditOrder">
            <div id="MainInfo" class="Box radius">
                <div class="BoxTitle radius">
                    البيانات الأساسية
                </div>
                <div>
                    <div class="row">
                        <ul class="title">
                            <li>الإسم</li>
                        </ul>
                        <ul class="data">
                            <li>
                                <asp:TextBox ID="txtpersonName" runat="server" Width="265px" Font-Size="20px" TabIndex="1"
                                    MaxLength="80" disabled="disabled" /><asp:RequiredFieldValidator ID="RequiredFieldValidator2"
                                        ErrorMessage="يجب إدخال إسم صاحب الطلب اولا" ControlToValidate="txtPersonName"
                                        runat="server" Text="*" ValidationGroup="OrderMainDetails" /></li>
                        </ul>
                        <ul class="title">
                            <li>الرقم</li>
                        </ul>
                        <ul class="data">
                            <li>
                                <asp:TextBox ID="txtOrderNumber" runat="server" Width="100px" TabIndex="1" MaxLength="20"
                                    disabled="disabled" /></li>
                        </ul>
                        <ul class="title">
                            <li>التاريخ</li>
                        </ul>
                        <ul class="data">
                            <li>
                                <asp:TextBox ID="txtDate" runat="server" Width="100px" TabIndex="2" disabled="disabled" /></li>
                        </ul>
                    </div>
                </div>
            </div>
            <div class="OrderFullInfo Box radius">
                <div class="BoxTitle radius">
                    بيانات الطلب
                </div>
                <div style="padding: 10px 30px;">
                    <div style="white-space: nowrap;">
                        <div class="col">
                            <ul class="title">
                                <li class="Alter">الموضوع</li>
                                <li>الجنسية</li>
                                <li class="Alter">بلد الإقامة <span>(الحالي)</span></li>
                                <li class="heightRow">الهوية</li>
                                <li>&nbsp;</li>
                            </ul>
                            <ul class="data" style="width: 260px;">
                                <li class="Alter">
                                    <asp:TextBox ID="txtSubject" runat="server" MaxLength="100" disabled="true" /></li>
                                <li>
                                    <asp:DropDownList ID="drpNationality" runat="server" Width="150" OnDataBound="drp_DataBound"
                                        disabled="true">
                                    </asp:DropDownList>
                                </li>
                                <li class="Alter">
                                    <asp:DropDownList ID="drpCurrenCity" runat="server" Width="150" OnDataBound="drp_DataBound"
                                        disabled="true">
                                    </asp:DropDownList>
                                </li>
                                <li class="heightRow">
                                    <div class="subLi">
                                        <asp:TextBox ID="txtIDNo" runat="server" MaxLength="10" CssClass="ltrNumbers" disabled="true" /></div>
                                    <div class="hradio">
                                        <asp:RadioButtonList ID="rdIDType" runat="server" RepeatDirection="Vertical" Enabled="false">
                                            <asp:ListItem Text="بطاقة/إقامة" Value="0" />
                                            <asp:ListItem Text="جواز سفر" Value="1" />
                                        </asp:RadioButtonList>
                                    </div>
                                </li>
                            </ul>
                        </div>
                        <div class="col">
                            <ul class="title" style="width: 140px;">
                                <li class="Alter">رقم التصنيف</li>
                                <li>مكان الميلاد</li>
                                <li class="Alter">مكان الحصول على الثانوية</li>
                                <li class="heightRow">جهة العمل</li>
                                <li>&nbsp;</li>
                            </ul>
                            <ul class="data" style="width: 220px;">
                                <li class="Alter">
                                    <asp:TextBox ID="txtClass" runat="server" MaxLength="20" CssClass="ltrNumbers" disabled="disabled" /></li>
                                <li>
                                    <asp:RadioButtonList ID="rdBirthPlace" runat="server" RepeatDirection="Horizontal"
                                        Enabled="false">
                                        <asp:ListItem Text="داخل السعودية" Value="0" />
                                        <asp:ListItem Text="خارج السعودية" Value="1" />
                                    </asp:RadioButtonList>
                                </li>
                                <li class="Alter">
                                    <asp:RadioButtonList ID="rdSecondrySchool" runat="server" RepeatDirection="Horizontal"
                                        Enabled="false">
                                        <asp:ListItem Text="داخل السعودية" Value="0" />
                                        <asp:ListItem Text="خارج السعودية" Value="1" />
                                    </asp:RadioButtonList>
                                </li>
                                <li class="heightRow">
                                    <div class="subLi">
                                        <asp:TextBox ID="txtWorkPlace" runat="server" MaxLength="80" disabled="disabled" />
                                    </div>
                                    <div class="hradio">
                                        <asp:RadioButtonList ID="rdWorkType" runat="server" RepeatDirection="Vertical" Enabled="false">
                                            <asp:ListItem Text="حكومي" Value="0" />
                                            <asp:ListItem Text="أهلي" Value="1" />
                                        </asp:RadioButtonList>
                                    </div>
                                </li>
                            </ul>
                        </div>
                    </div>
                    <div class="row" style="width:100%;">
                    </div>
                </div>
            </div>
            <div id="OrderSummery" class="Box  radius-Bottom collapse">
                <div class="ContentTitle">
                    <a href="#" class="expander">◄ عرض و تلخيص الطلب</a>
                </div>
                <div class="BoxContent">
                    <div class="row">
                        <asp:GridView runat="server" ID="grdSummery" AutoGenerateColumns="False" CellPadding="4"
                            ForeColor="#333333" GridLines="Both" BorderWidth="2">
                            <AlternatingRowStyle BackColor="White" />
                            <Columns>
                                <asp:TemplateField HeaderText="م">
                                    <ItemTemplate>
                                        <div style="width: 19px; text-align: center">
                                            <%#Container.DataItemIndex+1 %>
                                        </div>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="النقاط">
                                    <ItemTemplate>
                                        <%# Eval("Point") %>
                                    </ItemTemplate>
                                    <ItemStyle Width="368px" />
                                    <EditItemTemplate>
                                    </EditItemTemplate>
                                </asp:TemplateField>
                            </Columns>
                            <EditRowStyle BackColor="#2461BF" />
                            <EmptyDataTemplate>
                                <asp:Label ID="Label1" Text=" قم بالكتابة في المكان المخصص لإضافة عنصر جديد" runat="server"
                                    Width="500px" />
                            </EmptyDataTemplate>
                            <EmptyDataRowStyle ForeColor="White" Font-Bold="true" BorderStyle="None" />
                            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                            <HeaderStyle BackColor="#056796" Font-Bold="True" ForeColor="White" />
                            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                            <RowStyle BackColor="#EFF3FB" />
                            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                            <SortedAscendingCellStyle BackColor="#F5F7FB" />
                            <SortedAscendingHeaderStyle BackColor="#6D95E1" />
                            <SortedDescendingCellStyle BackColor="#E9EBEF" />
                            <SortedDescendingHeaderStyle BackColor="#4870BE" />
                        </asp:GridView>
                    </div>
                </div>
            </div>
            <div id="OrderRequest" class="Box  radius-Bottom collapse">
                <div class="ContentTitle">
                    <a href="#" class="expander">◄ يرغب صاحب الطلب</a>
                </div>
                <div class=" BoxContent row">
                    <div class="row">
                        <asp:GridView runat="server" ID="grdRequest" AutoGenerateColumns="False" CellPadding="4"
                            ForeColor="#333333" GridLines="Both" BorderWidth="2">
                            <AlternatingRowStyle BackColor="White" />
                            <Columns>
                                <asp:TemplateField HeaderText="م">
                                    <ItemTemplate>
                                        <div style="width: 35px; text-align: center">
                                            <%# Container.DataItemIndex+1 %>
                                        </div>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="النقاط">
                                    <ItemTemplate>
                                        <%# Eval("Point") %>
                                    </ItemTemplate>
                                    <ItemStyle Width="400px" />
                                </asp:TemplateField>
                            </Columns>
                            <EditRowStyle BackColor="#2461BF" />
                            <EmptyDataTemplate>
                                <asp:Label ID="Label1" Text=" قم بالكتابة في المكان المخصص لإضافة عنصر جديد" runat="server"
                                    Width="500px" />
                            </EmptyDataTemplate>
                            <EmptyDataRowStyle ForeColor="White" Font-Bold="true" BorderStyle="None" />
                            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                            <HeaderStyle BackColor="#056796" Font-Bold="True" ForeColor="White" />
                            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                            <RowStyle BackColor="#EFF3FB" />
                            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                            <SortedAscendingCellStyle BackColor="#F5F7FB" />
                            <SortedAscendingHeaderStyle BackColor="#6D95E1" />
                            <SortedDescendingCellStyle BackColor="#E9EBEF" />
                            <SortedDescendingHeaderStyle BackColor="#4870BE" />
                        </asp:GridView>
                    </div>
                </div>
            </div>
            <div id="OrderAttachmens" class="Box radius-Bottom collapse">
                <div class="ContentTitle">
                    <a href="#" class="expander">◄ وصف المرفقات</a>
                </div>
                <div class=" BoxContent row">
                    <div class="row">
                        <asp:GridView runat="server" ID="grdAttachments" AutoGenerateColumns="False" CellPadding="4"
                            ForeColor="#333333" GridLines="Both" BorderWidth="2" DataKeyNames="ID">
                            <AlternatingRowStyle BackColor="White" />
                            <Columns>
                                <asp:TemplateField HeaderText="م">
                                    <ItemTemplate>
                                        <div style="width: 35px; text-align: center">
                                            <%# Container.DataItemIndex+1 %>
                                        </div>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="النقاط">
                                    <ItemTemplate>
                                        <%# Eval("Point") %>
                                    </ItemTemplate>
                                    <ItemStyle Width="400px" />
                                </asp:TemplateField>
                            </Columns>
                            <EditRowStyle BackColor="#2461BF" />
                            <EmptyDataTemplate>
                                <asp:Label ID="Label1" Text="عفوا لا توجد مرفقات للطلب" runat="server" Width="500px" />
                            </EmptyDataTemplate>
                            <EmptyDataRowStyle ForeColor="White" Font-Bold="true" BorderStyle="None" />
                            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                            <HeaderStyle BackColor="#056796" Font-Bold="True" ForeColor="White" />
                            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                            <RowStyle BackColor="#EFF3FB" />
                            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                            <SortedAscendingCellStyle BackColor="#F5F7FB" />
                            <SortedAscendingHeaderStyle BackColor="#6D95E1" />
                            <SortedDescendingCellStyle BackColor="#E9EBEF" />
                            <SortedDescendingHeaderStyle BackColor="#4870BE" />
                        </asp:GridView>
                    </div>
                </div>
            </div>
            <div id="OrderInstructions" class="Box radius-Bottom">
                <div class="ContentTitle">
                    التوجيهات
                </div>
                <div id="AuthorityOf" class="row">
                    <ul class="title">
                        <li>صاحب الصلاحية</li>
                    </ul>
                    <ul class="data">
                        <li>
                            <asp:TextBox runat="server" ID="txtAuthorityOf" Width="250px" Font-Size="12" ValidationGroup="OrderInstructions"
                                MaxLength="80" /><asp:RequiredFieldValidator ID="RequiredFieldValidator3" ErrorMessage="*"
                                    ControlToValidate="txtAuthorityOf" ValidationGroup="OrderInstructions" runat="server"
                                    ForeColor="Red" Text="*" /></li>
                    </ul>
                </div>
                <center>
                    <div class="authContainer">
                    </div>
                </center>
                <div id="Instruction" class="row">
                    <ul class="title" style="height: 70px;">
                        <li>التوجية</li>
                    </ul>
                    <ul class="data">
                        <li>
                            <asp:TextBox runat="server" TextMode="MultiLine" ID="txtInstruction" ValidationGroup="OrderInstructions"
                                MaxLength="500" Width="550" /><asp:RequiredFieldValidator ErrorMessage="*" ControlToValidate="txtInstruction"
                                    runat="server" ForeColor="Red" ValidationGroup="OrderInstructions" Text="*" />
                        </li>
                    </ul>
                </div>
                <div id="InstructionDetails" class="row">
                    <div class="row">
                        <div class="subCol">
                            <ul class="title">
                                <li>يحال إلي</li>
                            </ul>
                            <ul class="data">
                                <li>
                                    <asp:TextBox runat="server" ID="txtForwardTo" Width="250" MaxLength="100" /></li>
                            </ul>
                        </div>
                        <div class="subCol">
                            <ul class="title">
                                <li>السبب</li>
                            </ul>
                            <ul class="data">
                                <li>
                                    <asp:TextBox runat="server" ID="txtForwardReason" MaxLength="150" Width="175" /></li>
                            </ul>
                        </div>
                    </div>
                </div>
                <div class="row">
                    <asp:Label Text=" " runat="server" ID="lblUploadMessage" />
                </div>
                <div id="instructionUpload" class="row">
                    <div class="subCol">
                        <ul class="title">
                            <li>صورة الطلب</li>
                        </ul>
                        <ul class="data">
                            <li>
                                <asp:FileUpload runat="server" ID="fuOrderSoftcopy" Width="220" Style="border" /><asp:RequiredFieldValidator
                                    ErrorMessage="يجب تحديد ملف اولا" ControlToValidate="fuOrderSoftcopy" runat="server"
                                    ForeColor="Red" Text="*" ValidationGroup="Upload" /><asp:Button Text="رفع الملف"
                                        runat="server" Font-Size="12" ID="btnUploadOrder" Width="70" ValidationGroup="Upload"
                                        OnClick="btnUploadOrder_Click" />
                            </li>
                        </ul>
                        <ul class="title">
                            <li>التاريخ</li>
                        </ul>
                        <ul class="data">
                            <li>
                                <asp:TextBox runat="server" ID="txtForwardDate" CssClass="date" Width="133" /></li>
                        </ul>
                    </div>
                </div>
            </div>
            <div class="ProgressContent">
                <asp:Button Text="تحديث الطلب" runat="server" ID="btnUpdateOrder" OnClick="btnUpdateOrder_Click"
                    CssClass="button" ValidationGroup="OrderInstructions" />
                <asp:Button Text="حفظ و إغلاق الطلب" runat="server" ID="btnSaveAndClose" OnClick="btnSaveAndClose_Click"
                    Font-Size="16" ValidationGroup="OrderInstructions" CssClass="button" />
            </div>
        </asp:View>
    </asp:MultiView>
</asp:Content>
